package com.ruipeng.shengyapo.service.impl;

import com.ruipeng.shengyapo.comm.Page;
import com.ruipeng.shengyapo.dao.PayMapper;
import com.ruipeng.shengyapo.service.PayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by tu_pei on 17/5/28.
 */
@Service
public class PayServiceimpl implements PayService{

    @Autowired
    private PayMapper payMapper;

    @Override
    public List<Map<String,Object>> getUserPayPageList(int userId) {

        return payMapper.getUserPayPageList(userId);
    }

    @Override
    public int depositAdd(Map<String, Object> params) {
        return payMapper.depositAdd(params);
    }

    @Override
    public Map<String, Object> getUserDepositInfo(Map<String, Object> params) {
        return payMapper.getUserDepositInfo(params);
    }

    @Override
    public int depositBack(Map<String, Object> params) {
        return payMapper.depositBack(params);
    }

    @Override
    public Page getCouponPageList(Page page, int userId) {
        page.setItems(payMapper.getCouponPageList(page,userId));
        return page;
    }

    @Override
    public int updateUserCoupon(Map<String, Object> params) {
        return payMapper.updateUserCoupon(params);
    }
}
